﻿using System;
using System.Collections.Generic;

namespace Allegro.Mathlib
{
    /// <summary>
    /// Sample data of type T
    /// </summary>
    public interface ISampler<T>
    {
        /// <summary>
        /// Initialize the sampler
        /// </summary>
        void BeginSampling();

        /// <summary>
        /// Draw next sample
        /// </summary>
        /// <returns></returns>
        T NextSample();

        /// <summary>
        /// Draw n samples
        /// </summary>
        /// <param name="n"></param>
        /// <returns></returns>
        T[] NextSamples(int n);

        /// <summary>
        /// If true, there are more samples to draw
        /// </summary>
        bool More { get; }
    }
    /// <summary>
    /// Sample data of type double
    /// </summary>
    public interface ISampler
    {
        /// <summary>
        /// Initialize the sampler
        /// </summary>
        void BeginSampling();

        /// <summary>
        /// Draw next sample
        /// </summary>
        /// <returns></returns>
        double NextSample();

        /// <summary>
        /// Next n samples
        /// </summary>
        /// <returns></returns>
        double[] NextSamples(int n);

        /// <summary>
        /// If true, there are more samples to draw
        /// </summary>
        bool More{ get;}
    }
}
